package com.qububu.systemBase;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @author ZCW
 * 获取spring管理的bean
 * */
@Component
public class ApplicationContextHandler implements ApplicationContextAware {

	private static ApplicationContext applicationContext;
	
	public void setApplicationContext(ApplicationContext context)
			throws BeansException {
		// TODO Auto-generated method stub
		this.applicationContext = context;
	}
	
	public static ApplicationContext getApplicationContext() {
		
		return applicationContext;
	}

}
